package com.lanyuan.a.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lanyuan.a.bean.Store;
import com.lanyuan.a.dao.BaseDao;
import com.lanyuan.a.service.StoreService;
@Service("storeService")
public class StoreServiceImpl implements StoreService {
	@Autowired
	public BaseDao<Store> baseDao;
	
	@Override
	public List<Store> list() {
		return baseDao.find("from Store");
	}

	@Override
	public Store findByWFid(int w_f_id) {
		return baseDao.get("from Store where w_f_id = ?", new Object[]{w_f_id});
	}

	@Override
	public void update(Store store) {
		System.out.println("---");
		baseDao.update(store);
		System.out.println("!!");
	}

}
